{$CLEO .cs}
0000:
const
    tm_addres = 0@
    off_se    = 1@
    get_key   = 2@
    block_1   = 3@
    to_key    = 4@
    block_2   = 5@
end
0ADF: "DMC1" "~Y~FUND model PRESS SPACE TO SPAWN"
:key
repeat 
wait 0
until if 0ab0: 54
0AC6: tm_addres = label @BUFFER offset
tm_addres += 0x0 
for 7@ = 0 to 16                                                                                         
    0A8C: write_memory tm_addres size 1 value 0x0 virtual_protect 0                                             
    000A: tm_addres += 1                                                                                         
end

off_se = 0
:loop
while true
    wait 0        
    FOR get_key = 0x20 TO 0x7e //func keyboard                                                                              
        IF AND //write active pressed key to buffer                                                                                                       
            0AB0: get_key //if player pressed scaned key
            NOT get_key == 0X20 //SET THIS SPAWN KEY                                                                                           
            block_1 == FALSE                                                                                         
            NOT off_se >= 16                                                                                         
        THEN block_1 = TRUE                                                                                          
            0085: to_key = get_key                                                                                 
            0AC6: tm_addres = label @BUFFER offset                                                                    
            005A: tm_addres += off_se                                                                                
            0A8C: write_memory tm_addres size 1 value get_key virtual_protect 0                                      
            off_se++                                                                                                 
        END                                                                                                           
        IF 8AB0: to_key                                                                                              
        THEN block_1 = FALSE                                                                                         
        END                                                                                                           
        IF AND                                                                                                        
            0AB0: 0X08 //BACKSPACE s -1                                                                                   
            block_2 == FALSE                                                                                         
        THEN block_2 = TRUE                                                                                          
            IF off_se > 0                                                                                            
            THEN off_se--                                                                                            
            END                                                                                                       
            0AC6: tm_addres = label @BUFFER offset                                                                    
            005A: tm_addres += off_se                                                                                
            0A8C: write_memory tm_addres size 1 value 0X0 virtual_protect 0                                           
        END                                                                                                           
        IF 8AB0: 0X08                                                                                                 
        THEN block_2 = FALSE                                                                                         
        END                                                                                                           
    end                                                                                                               
    0AC6: tm_addres = label @BUFFER offset                                                                            
    0A8D: 21@ = read_memory tm_addres size 4 virtual_protect 0 //part 4                                               
    tm_addres += 4                                                                                                    
    0A8D: 22@ = read_memory tm_addres size 4 virtual_protect 0 //part 8                                               
    tm_addres += 4                                                                                                    
    0A8D: 23@ = read_memory tm_addres size 4 virtual_protect 0 //part 12                                              
    tm_addres += 4                                                                                                    
    0A8D: 24@ = read_memory tm_addres size 4 virtual_protect 0 //par4 16                                              
    0AE0: remove_text_label "DMC"                                                                            
    0ADF: "DMC" 21@V                                                                       
    038E: draw_box_position 90.0 65.0 size 145.0 45.0 RGBA 200 0 0 150 
    038E: draw_box_position 90.0 65.0 size 140.0 40.0 RGBA 0 0 0 250                    
    081C: draw_text_outline 1 RGBA 0 0 0 255                                          
    0349: set_text_draw_font 2                                                             
    033F: set_text_draw_letter_size 0.25 1.0                                                
    0340: set_text_draw_RGBA 200 200 200 200                                                     
    033E: set_draw_text_position 23.0 60.0 GXT "DMC"  // Empurrar
    03F0: enable_text_draw 0 
    FOR 7@ = 400 TO 611
        0ADB: 17@V = car_model 7@ name
        IF 17@V == 21@V //if scan name is the same that write name                                                                                               
        THEN 
            081C: draw_text_outline 1 RGBA 0 0 0 255                                      
            0349: set_text_draw_font 2                                                        
            033F: set_text_draw_letter_size 0.2 0.7                                           
            0340: set_text_draw_RGBA 200 200 200 200                                             
            033E: set_draw_text_position 23.0 70.0 GXT "DMC1"  // Empurrar                    
            if 00E1:   player 0 pressed_key 16                                                     
            then                                                                                   
                model.Load(7@)                                                                                                 
                038B: load_requested_models                                                                                    
                WHILE NOT MODEL.Available(7@)                                                                                  
                WAIT 0                                                                                                         
                END                                                                                                            
                if and
                    056E:   car 6@ defined 
                    not actor.InCar($player_actor,6@)                                                                                     
                then car.Destroy(6@)                                                                                           
                end                                                                                                            
                04C4: store_coords_to 8@ 9@ 10@ from_actor $player_actor with_offset 0.0 3.0 -1.0                              
                6@ = car.Create(7@, 8@, 9@, 10@)                                                                               
                0ACD: "SPAWNED" 1000                                                                                           
                while 80E1:   player 0 pressed_key 16                                              
                wait 0                                                                             
                end                                                                                
            end                                                                                    
        END
    END
    if 00E1:   player 0 pressed_key 15      
    then 03F0: enable_text_draw 0 
         goto @key
    end                                                                                                               
end
               
:BUFFER
hex
"_________________________________________________" 00
end        
        
        
        
        
        
        
        
        
        
        